home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 1 / MacMania 1.toast / Educational / Education'More / D-G / French 1.1.sea / French 1.1 / stack_-1.xml < prev    next >
Extensible Markup Language  |  1992-03-27  |  3KB  |  20 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in.1</name>
  5.     <id>-1</id>
  6.     <cardCount>1</cardCount>
  7.     <cardID>5128</cardID>
  8.     <listID>2061</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><true /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>384</width>
  14.         <height>216</height>
  15.     </cardSize>
  16.     <script>on openStackhide titlebarcreate menu "Flashcards"put "Import Vocab,-,Erase All" into menu "Flashcards"if the number of lines of fld "French" of cd 1 > 1 thencreate menu "Categories"repeat with n= 2 to the number of lines in fld 1 of cd 1put line n of fld 1 of cd 1 after menu "Categories"end repeatget line 1 of fld 1 of cd 1put empty into fld 1 of cd 1put it into fld 1 of cd 1end ifend openStackon closeStackdelete menu "Flashcards"if there is a menu "Categories" thenrepeat with n = 1 to the number of items in menu "Categories"put return&item n of menu "Categories" after fld 1 of cd 1end repeatdelete menu "Categories"end ifunmark all cardsdoMenu "Compact Stack"end closeStackon doMenu yourChoiceif there is  a menu "Categories" thenif  yourchoice is in menu "Categories" then cardmarker yourchoiceend ifif yourchoice is "Import Vocab" thenImportDataelse if yourchoice is "Erase All"theneraseAllelse pass doMenuend doMenuon importDataanswer file "Select Vocabulary file to import" of type "TEXT"if the result is empty thenlock screengo last cdput it into filenameopen file filenameread from file filename until eofput the first line of it into categoryif the first char of category is "-" then put space before categoryif there is a menuitem category in menu "Categories" thenanswer "You've already got that file." with "OK"close file filenameexit to hypercardend ifif there is no menu "Categories" then create menu "Categories"put category after menu "Categories"repeat with n = 2 to the number of lines of itif fld "French" of cd 1 is not empty then doMenu "New Card"put category into fld "cardsinuse"put the number of this cd into cdnumput item 1 of line n of it into fld "French" of cd cdnumput item 2 of line n of it into fld "English" of cd cdnumend repeatclose file filenameend ifunlock screen with visual dissolve to blackend importDataon eraseAllanswer "Are you sure you want to delete ALL cards?" with "Yes" or "No"if it is "Yes" thenset cursor to busylock screenrepeat with n= 1 to (the number of cards) -1doMenu "delete card"end repeatrepeat with n = 1 to the number of fldsput empty into fld nend repeatif there is a menu "Categories" then  delete menu "Categories"end ifunlock screen with visual dissolve to blackend eraseAllOn cardMarker yourchoiceset the checkmark of menuitem yourchoice of menu "Categories" to not the checkmark of menuitem yourchoice of menu "Categories"if the checkmark of menuitem yourchoice of menu "Categories" is true then mark cards where fld "cardsinuse" = yourchoiceelse  unmark cards where fld "cardsinuse" = yourchoiceend cardmarker</script>
  17.     <background id="2773" file="background_2773.xml" name="" />
  18.     <card id="5128" file="card_5128.xml" marked="false" name="" owner="2773" />
  19. </stack>
  20.